package com.fupan.Direct;

import com.rabbitmq.client.Channel;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.io.IOException;

@Component
public class DirectQueryConsumer {


    @RabbitListener(queues = "directQueueQuery")
    public void onMsg(String msg , Channel channel, Message message) throws IOException {
        System.out.println("DirectQueryConsumer : "+msg);

        channel.basicAck(message.getMessageProperties().getDeliveryTag(),false);
    }


}
